package com.dgut.hisystem.mapper;

import com.dgut.hisystem.entity.Advice;
import com.dgut.hisystem.entity.Doctor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DoctorMapper {
    Doctor getDoctorId(Long id);

    Doctor getDoctorName(String name);

    void delete(Integer id);

    void updateRemark(Integer id,String yz_remark);

    Advice selectAdviceById(Integer id);

    void insert(Doctor doctor);

    @Delete({"DELETE FROM doctor_info WHERE yh_id = #{yh_id}"})
    void deleteByYhID(long yh_id);

    @Select({"SELECT * FROM doctor_info"})
    List<Doctor> getAllDoctors();
}
